home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 108 / MacAddict108.iso / Software / Graphics & Multimedia / Photoshop CS2 tryout.dmg / Adobe Photoshop CS2.mpkg / Contents / Resources / preflight < prev    next >
Encoding:
Text File  |  2005-03-22  |  1.4 KB  |  44 lines

  1. #!/bin/sh
  2. #
  3. # preflight for Adobe Photoshop CS2 metapackage installer
  4. #
  5.  
  6. /bin/echo "Performing preflight for Adobe Photoshop CS2"
  7.  
  8. # Check OS Version, Minimum is 10.2.8
  9. OSVERSION=`/usr/bin/sw_vers |/usr/bin/grep ProductVersion |/usr/bin/cut -d: -f2`
  10. /bin/echo "OSVERSION = ${OSVERSION}"
  11.  
  12. MAJORVER=`/bin/echo ${OSVERSION} | /usr/bin/cut -d . -f2`
  13. if [ ${MAJORVER} -lt 3 ] ; then
  14.         # if less then 10.3
  15.         if [ ${MAJORVER} -ne 2 ] ; then
  16.                 /bin/echo "Installation of this product is not supported on this version of MacOS. Minimum MacOS requirement is 10.2.8"
  17.         # 96 is the magic base number
  18.         let RETURNCODE=96+16
  19.                 exit ${RETURNCODE}
  20.         else 
  21.                 MINORVER=`/bin/echo ${OSVERSION} | /usr/bin/cut -d. -f3`
  22.                 if [ ${MINORVER} -lt 8 ] ; then
  23.                     /bin/echo "Installation of this product is not supported on this version of MacOS. Minimum MacOS requirement is 10.2.8"
  24.             let RETURNCODE=96+16
  25.                     exit ${RETURNCODE}
  26.                 fi      
  27.         fi
  28. fi
  29.  
  30. # Check Target volume, must be HFS+ 
  31. TARGETVOL=$3
  32. VOLTYPE=`/usr/sbin/diskutil info "${TARGETVOL}" | /usr/bin/grep "Partition Type" | \
  33.         /usr/bin/cut -d: -f2` 
  34. FSTYPE=${VOLTYPE#*Apple_}
  35. if [ ${FSTYPE} != HFS ] ; then
  36.     echo "Target volume type not supported: ${VOLTYPE}"
  37.     let RETURNCODE=96+17
  38.         exit ${RETURNCODE}
  39. fi
  40.  
  41. /bin/echo "Continuing installation."
  42. exit 0
  43.  
  44.